package week1exercises;

public class FizzBuzz {
    public static String fizzbuzz(int start, int n) {
        String retVal = "";
        for (int i = start; i < n; i++) {
            if (i % 3 == 0 && i % 5 == 0)
                retVal = retVal.concat("FizzBuzz\n");
            else if (i % 3 == 0)
                retVal = retVal.concat("Fizz\n");
            else if (i % 5 == 0)
                retVal = retVal.concat("Buzz\n");
            else
                retVal = retVal.concat(Integer.toString(i)).concat("\n");
        }
        return retVal;
    }
}
